var viewUtil={};
//{searchBox:[{label:'账号',id:'account'},{label:'状态'，id:'state'}],searchBtn:[{id:'search'},{id:'reset'},{id:'edit'}]}
/**
 * 创建视图工具类
 * @param panelName {String} 面板名
 * @param searchBar {Object} 搜索条参数 格式见注释
 * @param tableID {String} 表格id
 */
viewUtil.getBodyView=function (panelName,searchBar,tableID) {
  var mainWrap = '<div class="easyui-panel" title="'+panelName+'" \n' +
                 'data-options="openAnimation:\'fade\',maximized:true,style:{padding:10}">\n' +
                  '<div id="barWrap"></div>\n'+
                  '<table id="'+tableID+'"></table>\n'+
                 '</div>';
  document.querySelector("body").innerHTML=mainWrap;

  var barWrap = '';
  if(searchBar.searchBox && searchBar.searchBox.length>0){
    for(let i=0,l=searchBar.searchBox.length;i<l;i++){
      let item = searchBar.searchBox[i];
      barWrap += '<div class="search-item">'+item.label+'<input id="'+item.id+'">'+'</div>';
    }
  }
  if(searchBar.searchBtn && searchBar.searchBtn.length>0){
    for (let j = 0, l = searchBar.searchBtn.length; j < l; j++) {
      let item = searchBar.searchBtn[j];
      barWrap += '<a id="'+ item.id +'" ></a>'
    }
  }
  document.querySelector("#barWrap").innerHTML=barWrap;

  $.parser.parse('body');
};